1. Field of the Invention
The present invention relates to a connection control circuit for connecting two devices through a serial interface, standardized according to IEEE Standard for a High Performance Serial Bus, IEEE Std. 1394-1995, for example.
This application is based on a Japanese Patent Application No. Hei 11-306039 (unpublished), the content of which is incorporated herein by reference.
2. Description of the Related Art
Recently, considerations have been given to forming a network by connecting personal computers PCs, peripheral devices or audio-visual (AV) devices through serial interfaces (for example, according to IEEE Standard for a High Performance Serial Bus, IEEE Std 1394-1995, referred to as 1394-standard hereinbelow). FIG. 11 shows a configuration of a network connected to four devices (referred to as nodes hereinbelow).
As can be seen in FIG. 11, a network is formed by interconnecting the nodes A, B, C, D by way of ports (1), (2) and (3). In the physical layer of each node A-D, there are provided a state arbitration machine 101 for initializing bus lines and securing the transmission right for bus lines, and a connection state managing machine (indicated by 5 in FIG. 12) provided in each port for managing port-to-port connections.
Each port (1)-(3) functions as a connection control circuit, and is comprised by a sending code processing circuit 1, a sending circuit 2, a receiving circuit 3, a receiving code processing circuit 4 and a connection state managing machine 5, as shown in FIG. 12. FIG. 12 shows a connection between the ports of two opposing nodes A, D of a transmission line, and in this case, port (3) of node A is connected to port (1) of node D.
Here, the operation of port-to-port connection within a given port is specified by a respective connection state managing machine 5 provided in each of the ports (1)-(3).
FIG. 13 shows a current state of the connection state managing machine 5 and its transition paths of connecting states.
First, when there is no node connection to the ports, the connection state managing machine 5 is in the disconnected state P0. While the machine is in state P0, if a new connection is made to its port, the state shifts to the resuming state P1, and the sending code processing circuit 1 and the receiving code processing circuit 4 inside the port are initialized. After the initialization step, the state shifts to the active state P2.
If a disconnection of a port is detected, the connection state managing machine 5 shifts to the disconnected state P0 via the suspended state P5. Also, when the command is received from the upper layer to suspend a port, the state shifts from the active state P2 to the suspended state P5. Further, when a port-disable command is received from the upper layer, the state shifts to the disabled state.
The disconnected state P0 means physical and logical non-connections, and active state P2 means physical and logical connections. The suspended state P5 means a physical connection but no logical connection, and the disabled state P6 means that the circuits are stopped within the port and that neither physical nor logical connection has been detected.
The manner of detecting the physical connection and logical connection is different depending on the type of serial-bus interfaces used to make the connection, i.e., whether the connection is the DC (direct current) coupling system (specified by P1394a Draft Standard for a High Performance Serial Bus) or the AC (alternating current) coupling system (specified by P1394b Draft Standard for a High Performance Serial Bus).
In the case of the DC coupling system, determination of physical and logical connections are made by detecting the voltage levels. The present invention is concerned with the AC coupling system so that detailed explanation of DC coupling system is omitted. The method of detecting physical and logical connections in the AC coupling system will be explained in the following.
In the AC coupling system, the physical connection is detected by utilizing a connection managing control signal called a tone signal. As shown in FIG. 14, a tone signal is a on/off modulated signal operating at a carrier clock frequency of 50 MHz with a period of 42.666 ms. Tone signals are transmitted when the port is either in the disconnected state P0 or in the suspended state P5.
Only the envelope-signal part of the tone signal received by the receiver side is output from the receiving circuit 3 as sgd-signal (meaning signal detected). Upon receiving the tone signal, the connection state managing machine 5 recognizes that a physical connection has been made to its port based on the receipt of the sgd-signal.
On the other hand, when the nodes are connected to each other and both ports are in the active state P2 (i.e., logically connected), signals from the state arbitration machine 101 of each node are transmitted to the sending code processing circuit 1 in each port, and a continuous signal is output from the sending circuit 2. Here, a continuous signal means a random signal containing no long strings of xe2x80x980sxe2x80x99 or xe2x80x981sxe2x80x99, such that xe2x80x980xe2x80x99 and xe2x80x981xe2x80x99 are output in a ratio of 1:1 within a specific interval.
When the continuous signal is received by the receiver side, sgd-signal becomes fixed at xe2x80x981xe2x80x99. When this state is detected, the connection state managing machine 5 recognizes that a logical connection is being made.
For the purpose of explaining the actions of the connection state managing machine 5 when it receives a tone signal or a continuous signal, it is assumed that the port is currently in the suspended state P5. When the connection state managing machine 5 is in the suspended state P5, and a tone signal is received, the current state is maintained, but if a continuous signal is received, the connection state managing machine 5 shifts to the resuming state P1. When neither the tone signal nor the continuous signal is being received, it is determined that the cable is not connected, and it shifts to the disconnected state P0.
FIGS. 15A and 15B show flowcharts of the operations of the connection state managing machine 5 when the port starts from the suspended state P5. FIG. 15A shows the process of latching the envelope-signal sgd (the first signal) and producing an sdd-signal (meaning sd_detected, the second signal), and FIG. 15B shows the process of setting xe2x80x981xe2x80x99 in the rok-signal (meaning receive OK) when a continuous signal is detected. Processes described in FIGS. 15A, 15B are carried out concurrently. The operations shown in FIGS. 15A, 15B will be explained further in the following.
When the sgd-signal is received during the A-interval shown in FIG. 14, because sgd is set to xe2x80x980xe2x80x99, sdd is also xe2x80x980xe2x80x99 and the processing loop L51 is carried out (step S111, S112). In the B-interval in the meantime, because sgd=xe2x80x981xe2x80x99 (step S101), latched signal sdd is also xe2x80x981xe2x80x99 (step S102, processing 1). Because the latched signal sdd is set to xe2x80x981xe2x80x99, the sdd-signal passes through the loop processing L51 (shown in FIG. 15B) and loop processing L52 (step S113, S114) is carried out until the count 1 reaches a value of Tc. Here, Tc represents a count value corresponding to a time interval (666 xcexcs) during which tone signal is xe2x80x981xe2x80x99.
After an interval of Tc, sdd-signal is reset to xe2x80x980xe2x80x99 (step S115, processing 2). And, because a time interval Tc has elapsed since sgd was set to xe2x80x981xe2x80x99, sgd-signal is reset to xe2x80x980xe2x80x99, and therefore, sdd-signal maintains the reset state at xe2x80x980xe2x80x99 (step S115, processing 2), so that sdd-signal returns to the initial processing by way of the return path R51 (step S116). While the tone signals are received, the above process is repeated and the port is maintained in the suspended state P5.
On the other hand, if a continuous signal is received from the opposing port, sgd-signal is fixed at xe2x80x981xe2x80x99 (FIG. 16, interval C). In this case, sgd=xe2x80x98lxe2x80x99 and sdd-signal is set to xe2x80x981xe2x80x99 by processing 1 (FIG. 15A, step S101, S102). After the sdd-signal is set to xe2x80x981xe2x80x99 (step S112, S113, S114), and after waiting for the interval Tc, sdd-signal is reset to xe2x80x980xe2x80x99 (step S115, processing 2).
Even though sdd-signal is reset to xe2x80x980xe2x80x99, because sgd-signal is fixed at xe2x80x981xe2x80x99 while the port is receiving continuous signal, sdd-signal is again set to xe2x80x981xe2x80x99 by processing 1 (step S102). Therefore, after the sdd-signal is set to xe2x80x981xe2x80x99 and continuing to count for the interval Tc (loop L53), the sdd-signal is reset to xe2x80x980xe2x80x99, and rok signal is set to xe2x80x981xe2x80x99. By carrying out these steps, the port is shifted from the suspended state P5 to the resuming state P1.
However, the connection control methodology according to the related technology described above presents the following problems.
As shown in FIG. 17, when the fall delay time fd of the receiving circuit 3 is larger than the rise delay time rd of the envelope-signal (sgd-signal) of the tone signal, the pulse width of sgd-signal can sometimes be wider than the pulse width (Tc) of the tone signal. When the port is in the suspended state P5, tone signals are being exchanged between the opposing connected ports, so that if the pulse width of the sgd-signal becomes wider than the interval Tc, the connection state managing machine 5 erroneously recognizes the tone signal as the continuous signal, thereby setting the rok signal to xe2x80x981xe2x80x99. The result is that the ports are shifted from the suspended state P5 to the resuming state P1, resulting that the suspended state cannot be maintained.
It is, therefore, an object of the present invention to provide a connection control circuit (port), according to the 1394 standard serial interface connection, so as to guarantee the port connection service by maintaining the suspended state of a port receiving a tone signal in its receiving circuit, even when the pulse width of the envelope-signal of the tone signal output from the receiving circuit of the receiving port is wider than the pulse width of the tone signal transmitted from the opposing sending port.
To achieve the object, the present connection control circuit is comprised by an envelope-signal generation section for receiving an incoming signal sent from a device at an opposing end of a transmission line and generating an envelope-signal in accordance with the incoming signal; a discrimination section for discriminating, based on the envelope-signal, whether the incoming signal is a continuous signal or a connection managing signal by referencing a specific discrimination interval that is longer than a pulse width of the envelope-signal of a connection managing signal output from the envelope-signal generation section; and a connection managing section for shifting a state of the connection control circuit according to a type of incoming signals determined by the discrimination section.
The connection control circuit having the structure described above does not mistakenly recognize a connection control signal output from a sender port as a continuous signal even if a pulse width of the envelope-signal produced from the connection control signal in the receiver port is wider than a pulse width of the sender""s connection control signal. The result is that the connection control circuit that is currently in the suspended state can be maintained in the suspended state by the connection managing section.